<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <link rel="stylesheet" href="{{ url_for('static', filename='editor/css/editormd.preview.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='editor/css/editormd.css') }}">
    <link rel="shortcut icon" href="https://pandao.github.io/editor.md/favicon.ico" type="image/x-icon"/>

    <style>
        .editormd-html-preview {
            width: 90%;
            margin: 0 auto;
        }
    </style>

</head>
<body>

<div id="layout">
    <div id="test-editormd-view2">
        <textarea id="append-test" style="display:none;">{{ article.body }}</textarea>
    </div>
</div>
<script src="https://cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
<script src="{{ url_for('static', filename='editor/lib/marked.min.js') }}"></script>
<script src="{{ url_for('static', filename='editor/lib/prettify.min.js') }}"></script>
<script src="{{ url_for('static', filename='editor/lib/raphael.min.js') }}"></script>
<script src="{{ url_for('static', filename='editor/lib/underscore.min.js') }}"></script>
<script src="{{ url_for('static', filename='editor/lib/sequence-diagram.min.js') }}"></script>
<script src="{{ url_for('static', filename='editor/lib/flowchart.min.js') }}"></script>
<script src="{{ url_for('static', filename='editor/lib/jquery.flowchart.min.js') }}"></script>
<script src="{{ url_for('static', filename='editor/editormd.js') }}"></script>
<script type="text/javascript">
    $(function () {
        var testEditormdView2 = editormd.markdownToHTML("test-editormd-view2", {
            htmlDecode: "style,script,iframe",  // you can filter tags decode
            emoji: true,
            taskList: true,
            tex: true,  // 默认不解析
            flowChart: true,  // 默认不解析
            sequenceDiagram: true,  // 默认不解析
        });
    });
</script>

</body>
</html>